<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/include/taglibs.jsp"%>


<div>
<h2>评价此软件:</h2>
<h3>${remark.tag.title}</h3>
<form:form commandName="remark" name="form1" id="form1" method="post"
	action="remarkRootTag.html"
	onsubmit="former.ajaxSubmitForm();return false;">

	<table class="detail">
	
		<form:hidden path="tag.tagId" />
		<tr>
			<td>成熟度：</td>
			<td><form:select path="maturity">
				<form:option value="-" label="--请选择" />
				<form:option value="5" label="很成熟(5)" />
				<form:option value="4" label="较成熟(4)" />
				<form:option value="3" label="一般(3)" />
				<form:option value="2" label="较不成熟(2)" />
				<form:option value="1" label="不成熟(1)" />
			</form:select></td>
		</tr>
		<tr>
			<td>学习曲线：</td>
			<td><form:select path="learning">
				<form:option value="-" label="--请选择" />
				<form:option value="5" label="很快上手(5)" />
				<form:option value="4" label="较块上手(4)" />
				<form:option value="3" label="一般(3)" />
				<form:option value="2" label="较难学(2)" />
				<form:option value="1" label="难学习(1)" />
			</form:select></td>
		</tr>
		<tr>
			<td>活跃度：</td>
			<td><form:select path="active">
				<form:option value="-" label="--请选择" />
				<form:option value="5" label="很活跃(5)" />
				<form:option value="4" label="较活跃(4)" />
				<form:option value="3" label="一般(3)" />
				<form:option value="2" label="较不活跃(2)" />
				<form:option value="1" label="不活跃(1)" />
			</form:select></td>
		</tr>
		
		<tr>
			<td>总体评分：</td>
			<td><form:select path="opinion">
				<form:option value="-" label="--请选择" />
				<form:option value="10" label="10分" />
				<form:option value="9" label="9分" />
				<form:option value="8" label="8分" />
				<form:option value="7" label="7分" />
				<form:option value="6" label="6分" />
				<form:option value="5" label="5分" />
				<form:option value="4" label="4分" />
				<form:option value="3" label="3分" />
				<form:option value="2" label="2分" />
				<form:option value="1" label="1分" />
			</form:select></td>
		</tr>
		

		<tr>
			<td>您的评价：</td>
			<td><textarea name="content" rows="5" cols="30" type="_moz">${remark.content}</textarea></td>
		</tr>

		<tr>
			<td>&nbsp;</td>
			<td align=center><input type="submit" class="button" name="save"
				value="评价" /> <input type="button" class="button" name="cancel"
				value="返回" onclick="javascript:TB_remove();" /></td>
		</tr>

	</table>
</form:form></div>
<script type='text/javascript' LANGUAGE="javascript">
	var former = new AjaxFormer($$('form1'));

	function ajaxValidate(){
	
	// var str=$("tagStr").value.trim();
    //	if(str==""){ 
    //	alert("请输入或选择标签"); 
    //	return false;
    //	}
    return true;
	}
	
	function ajaxSucess(){
	$$("remarkStatus_${remark.tag.tagId}").innerHTML="谢谢评价";
	$$("remarkCount_${remark.tag.tagId}").innerHTML=1+parseInt($$("remarkCount_${remark.tag.tagId}").innerHTML);
    refreshRemark(${remark.tag.tagId},1);
    TB_remove();	     
	}
	
    
    function refreshRemark(tag,page)
    {
    	if( $$("remarks")!=null){
       $$("remarks").innerHTML="载入中...";
       var xmlhttp = getHttpRequest();
		xmlhttp.open("post","listRootTagRemark.ajax?id="+tag,false);
		xmlhttp.send("");
       $$("remarks").innerHTML=xmlhttp.responseText;}
    }
	  
</script>

